/**
 * @file main.cpp
 * @author Tales Miranda
 * @brief The PathFinder project's main file.
 *
 * The objective of this project is build a simulator to test differents path finding algorithms.
 *
 **/
#include <iostream>
#include <SDL.h>
#include "wolf.hpp"
#include "path_finder.hpp"

using namespace wolf;

int main(int argc, char** argv)
{
	try
	{
		Engine::prepare();
		SDL_EnableUNICODE(true);
		SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY, SDL_DEFAULT_REPEAT_INTERVAL);
		Engine myEngine(Engine::DEBUG);

		myEngine.setVideoMode(800, 600, 0);
		myEngine.setFrameRate(30);
		PathFinder handler;
		handler.refreshStatus();
		myEngine.addEventHandler(handler, Engine::INSERT_AT_BEGIN);
		myEngine.start();
		while (myEngine.isRunning())
		{
			myEngine.doFrame();
		}
		myEngine.end();
	} catch (exception &e)
	{
		std::cerr << e.what();
	}

	return 0;
}
